from fastapi import Form
from pydantic import BaseModel
from requests import Session

from models import User


class UserRegister(BaseModel):
    name: str=Form(...)
    password: str=Form(...)
    phone: str=Form(...)
    password_confirm: str=Form(...)

class RootRegister(BaseModel):
    name: str=Form(...)
    password: str=Form(...)
    phone: str=Form(...)
    password_confirm: str=Form(...)


class Product(BaseModel):
    name: str
    description: str
    price: int
    image: str




class ProductPublic(BaseModel):
    id:int
    image:str
    name:str
    price:int
    color:str
    spec:str
    model:str
    description:str
    image_uri:str=None
    class Config:
        from_attributes = True



class OfficialPublic(BaseModel):
    id:int
    name:str
    image:str
    description:str
    class Config:
        from_attributes = True

